home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / pascal / pcxkt3.zip / SHOWEGA.PAS < prev    next >
Pascal/Delphi Source File  |  1991-12-31  |  819b  |  29 lines

  1. program SHOWEGA;
  2.  
  3. (* Sample implementation of PCX.TPU for EGA. You need to have the Turbo
  4.    .BGI files in the current directory, or change the Initgraph path. Enter
  5.    a filename (without extension) on the command line or, if running under
  6.    Turbo, in the Parameters box. *)
  7.  
  8. uses GRAPH, CRT, PCX;
  9.  
  10. var   grdriver, grmode: integer;
  11.  
  12. begin
  13. pcxfilename:= paramstr(1) + '.PCX';
  14. grdriver:= ega; grmode:= egahi;               { 640x350x16 format }
  15. initgraph(grdriver, grmode, '');
  16. setvisualpage(1);                             { Hide the image }
  17. read_pcx_file(grdriver, pcxfilename);
  18. if file_error then
  19. begin
  20.   closegraph;
  21.   write('File not found.');
  22.   halt;
  23. end;
  24. setallpalette(pal);
  25. setvisualpage(0);                             { Show the image }
  26. repeat until readkey <> #1;
  27. closegraph;
  28. end.
  29.